package com.seckill.demo.disruptor;


/**
 * @description disruptor代码样例。每10ms向disruptor中插入一个元素，消费者读取数据，并打印到终端
 */

import com.lmax.disruptor.*;
import com.lmax.disruptor.dsl.Disruptor;
import com.lmax.disruptor.dsl.ProducerType;

import java.util.ArrayList;
import java.util.List;
import java.util.Vector;
import java.util.concurrent.ThreadFactory;


public class MainTest {

    public static void main(String[] args) {
        Vector<String> vector = new Vector<>();
        for (int i = 0; i < 100; i++) {
            vector.add("a" + i);
        }

        List<String> list = new ArrayList<>(1);
        list.add("a");
        list.set(2, "b");

        System.out.println(vector);
//        System.out.println(list);
    }


}